<%-- 
    Document   : Imprimir_Boleta
    Created on : 23-oct-2012, 14:31:21
    Author     : Pavilion
--%>

<%@page import="Clases.ConectarBD" %>
<%@page import="Clases.Usuario" %>
<%@page import="Clases.Propiedades" %>
<%@page import="Clases.Boletas" %>
<%@page import="java.util.*,com.mysql.jdbc.Connection,java.sql.*,java.util.Calendar" %>
<%@page import="java.text.*" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">

<% if (session.getAttribute("elUsuario")==null) {
        response.sendRedirect("index.jsp");
    } else {
        HttpSession miSesion = request.getSession();
        Usuario esteUsuario = (Usuario) miSesion.getAttribute("elUsuario");

    }
 HttpSession miSesion = request.getSession();
  Calendar cal = Calendar.getInstance();
 SimpleDateFormat df = new SimpleDateFormat("dd/MM/yyyy");
 %>
 
 <jsp:useBean id="boleta" scope="page" class="Clases.Boletas" />
 <jsp:useBean id="casa" scope="page" class="Clases.Propiedades" /> 
 <% casa.cargarInmuebleBoleta(Integer.valueOf(request.getParameter("id_boleta"))); %>
 <% boleta.cargarListaBoletas(Integer.valueOf(request.getParameter("id_boleta"))); %>
<html>

<head>
	<title>Factura</title>
	<link rel=StyleSheet href="styles.css" type="text/css" />
</head>

<body class="ubicacion" style="margin: auto">    
<script type="text/javascript"> 
 function cerrar(){
    window.close();   
  }
 </script>
 
<HR size="2" color="negro"/>
<div class="header" >
<div style="width: 100px; height: 100px; display: inline-block">
    <img src="imagenes\escudodeseado.jpg" Style="text-decoration:underline; width: 100px; height: 100px; border: 0px; padding: 0px; margin: 0px" alt="" />
</div>
<Div  style="width: 700px; height: 100px; background-color: blue; display: inline-block; vertical-align: top"  > 
    <H4>MUNICIPALIDAD DE PUERTO DESEADO</H4>
    <H5>Agencia de Recaudaci&oacute;n Municipal</H5>
</Div>
</div>
<HR size="2" color="negro"/>
<div >
    <p style="min-width: 30px; background-color: rgba(128, 128, 128, 0.19); text-align: right; " class="fRight">
        <span class="pRight10 h10">Factura N°:</span><jsp:getProperty name="boleta" property="IDBoleta"/>
    </p>
    <div class="clearer"></div>
</div>
<HR size="2" color="negro"/>

<div style="width: 550px; height: 150px; background-color: rgba(128, 128, 128, 0.19); display: inline-block" >
    <div style="background-color: gray"><p class="h12" style="margin-top: 0px">TITULAR DE LA CUENTA</p></div>   
<div style="width: 550px">      
    <div class="bordes1" style="margin-top: 10px; margin-bottom: 10px"><p class="bordes1 h10" style="display: inline-block; padding-left: 5px">Nombre: </p><p class="bordes1" style="display: inline-block; padding-left: 15px"><%= miSesion.getAttribute("denominacion") %></p> </div>
    <div class="bordes1" style="display: inline-block; margin-top: 15px; width: 75px; padding-left: 5px"><p class="bordes1 h10"> Direcci&oacute;n: </p></div><div class="bordes1" style="display: inline-block; margin-top: 15px; width: 430px; margin-left: 15px"><p class="bordes1" style="display: inline-block; width: 420px" ><%= miSesion.getAttribute("direccionUs") %></p></div>  
</div >
</div>

<div style="display: inline-block; width: 250px; height: 150px; vertical-align: top"> 
     <div class="bordes1" style="margin-top: 5px; padding-bottom: 0px; margin-bottom: 0px; text-align: center "><p class="h10"><jsp:getProperty name="casa" property="codigo" /></p></div>    
     <div class="bordes1" style="margin-top: 3px; margin-bottom: 10px; text-align: center "><p>C&oacute;digo para cajeros autom&aacute;ticos</p></div>
     <div class="bordes1" style="margin-top: 20px;"><p class="h13" style="width: 105px; margin-left: 5px; display: inline-block">Partida: </p><p class="h12"  style="width: 135px; display: inline-block; margin-top: 8px; margin-left: 3px; text-align: right"><jsp:getProperty name="casa" property="cuenta"/> DV 0<jsp:getProperty name="casa" property="zona"/></p></div>
</div> 
<HR size="2" color="negro" />

<div style="height: 15px; width: 100%"></div>

<HR size="2" color="negro" style="margin-bottom: 5px;"/>
<div style="height: 75px; width: 100%;">
    <div style="width: 395px; height: 77px; margin-right: 0px; margin-left: 0px; padding-right: 0px; padding-left: 0px; vertical-align: top; display: inline-block; border: 1px solid;"><p class="h10" style="display: inline-block; width: 112px; margin-left: 5px; vertical-align: middle;">Valor Fiscal:</p><p style="display: inline-block; text-align: right; width: 272px; vertical-align: middle;">$  <jsp:getProperty name="casa" property="baseImponibleString"/></p></div>
    <div style="width: 197px; height: 77px; margin-right: 0px; margin-left: 0px; padding-right: 0px; padding-left: 0px; display: inline-block; padding-left: 0px; padding-right: 0px; border: 1px solid;"><p class="h10" style="text-align: center;">Zona:</p><p style="text-align: center;"><jsp:getProperty name="casa" property="zona"/></p></div>
    <div style="width: 197px; height: 77px; margin-right: 0px; margin-left: 0px; padding-right: 0px; padding-left: 0px; display: inline-block; padding-left: 0px; padding-right: 0px; border: 1px solid;"><p class="h10" style="text-align: center;">Porc. Fiscal:</p><p style="text-align: center;">3,9 %</p></div> 
</div>
<HR size="2" color="negro" style="margin-top: 10px"/>

<div style="height: 15px; width: 100%"></div>

<HR size="2" color="negro" style="margin-bottom: 5px;"/>

<div style="height: 45px; width: 100%; text-align: middle">
    <div style="width: 478px; display: inline-block; margin-right: 0px; margin-left: 0px; padding-right: 0px; padding-left: 0px; border: 1px solid;"><p class="h10" style="display: inline-block; width: 275px; margin-left: 5px;">Fecha de emisi&oacute;n:</p><p style="width: 195px; display: inline-block; text-align: right;"><%= df.format(cal.getTime()) %></p></div>
    <div style="width: 318px; display: inline-block; margin-right: 0px; margin-left: 0px; padding-right: 0px; padding-left: 0px; border: 1px solid;"><p class="h10" style="width: 125px; display: inline-block; margin-left: 5px;">Per&iacute;odo:</p><p style="width: 185px; text-align: right; display: inline-block; text-align: right;"><jsp:getProperty name="boleta" property="periodo"/></p></div>
</div>
<HR size="2" color="negro" style="margin-top: 15px"/>

<div style="background-color: #A0A0A0; height: 320px; margin-top: 80px;">
    <div style="width: 315px; height: 320px; vertical-align: top; display: inline-block; border: 1px solid">
    <div><h1 class="h12" style="margin-top: 60px; margin-left: 10px; margin-bottom: 10px">Titular: </h1><h1 class="h12" style="margin-left: 10px;"><%= miSesion.getAttribute("denominacion") %></h1> </div>
    <div style="height:105px; margin-top:70px; text-align: center"><img src='imagenes/codigo_barras.gif' width="270" height="90"></div>   
</div>
	<div style="width: 235px; height: 320px; display: inline-block; vertical-align: top; border-color: black; border: 1px solid;" >      
            <div style="margin-top: 5px; margin-bottom: 8px"><p class="h10" style="display: inline-block; margin-left: 5px; width: 95px;">Factura N°: </p><p class="bordes1" Style="display: inline-block; width: 125px; text-align: right;"><jsp:getProperty name="boleta" property="IDBoleta"/></p></div>
            <Div style="margin-top: 20px; margin-bottom: 10px"><p class="bordes1 h10" style="display: inline-block; margin-left: 5px; width: 75px ">Partida: </p><p class="bordes1" style="width: 140px; display: inline-block; text-align: right;"><jsp:getProperty name="casa" property="cuenta"/> DV 0<jsp:getProperty name="casa" property="zona"/></p></Div> 
            <Div style="margin-top: 15px; margin-bottom: 10px"><p class="bordes1 h10" style="display: inline-block; margin-left: 5px; width: 70px">1er. Vto: </p><p class="bordes1" style="display: inline-block; width: 145px; text-align: right;"><jsp:getProperty name="boleta" property="vencimiento1"/></p></Div>
            <Div style="margin-top: 15px; margin-bottom: 10px"><p class="bordes1 h10" style="display: inline-block; margin-left: 5px; width: 125px">Pago 1er. Vto:  $</p><p class="bordes1" style="display: inline-block; text-align: right; width: 90px;"><jsp:getProperty name="boleta" property="montoActualizadoString"/></p></Div>  	  
            <Div style="margin-top: 15px; margin-bottom: 10px"><p class="bordes1 h10" style="display: inline-block; margin-left: 5px; width: 70px">2do. Vto:</p><p class="bordes1" style="display: inline-block; width: 145px; text-align: right;"><jsp:getProperty name="boleta" property="vencimiento2"/></p></Div> 
            <Div style="margin-top: 15px; margin-bottom: 10px"><p class="bordes1 h10" style="display: inline-block; margin-left: 5px; width: 130px">Pago 2do. Vto:  $</p><p class="bordes1" style="display: inline-block; width: 85px; text-align: right;"><jsp:getProperty name="boleta" property="monto2String"/></p></Div>  		
            <div style="margin-top: 30px"><p class="bordes1" style="text-align: center;">Tal&oacute;n para Agencia Recaudadora</p></div>
        </div >
	<div style="width: 235px; height: 320px; vertical-align: top; display: inline-block; border: 1px solid;" >      
            <div style="margin-top: 5px; margin-bottom: 8px"><p class="h10" style="display: inline-block; margin-left: 5px; width: 95px;">Factura N°: </p><p class="bordes1" Style="display: inline-block; width: 125px; text-align: right;"><jsp:getProperty name="boleta" property="IDBoleta"/></p></div>
            <Div style="margin-top: 20px; margin-bottom: 10px"><p class="bordes1 h10" style="display: inline-block; margin-left: 5px; width: 75px ">Partida: </p><p class="bordes1" style="width: 140px; display: inline-block; text-align: right;"><jsp:getProperty name="casa" property="cuenta" /> DV 0<jsp:getProperty name="casa" property="zona"/></p></Div> 
            <Div style="margin-top: 15px; margin-bottom: 10px"><p class="bordes1 h10" style="display: inline-block; margin-left: 5px; width: 70px">1er. Vto: </p><p class="bordes1" style="display: inline-block; width: 145px; text-align: right;"><jsp:getProperty name="boleta" property="vencimiento1"/></p></Div>
            <Div style="margin-top: 15px; margin-bottom: 10px"><p class="bordes1 h10" style="display: inline-block; margin-left: 5px; width: 125px">Pago 1er. Vto:  $</p><p class="bordes1" style="display: inline-block; text-align: right; width: 90px;"><jsp:getProperty name="boleta" property="montoActualizadoString"/></p></Div>  	  
            <Div style="margin-top: 15px; margin-bottom: 10px"><p class="bordes1 h10" style="display: inline-block; margin-left: 5px; width: 70px">2do. Vto:</p><p class="bordes1" style="display: inline-block; width: 145px; text-align: right;"><jsp:getProperty name="boleta" property="vencimiento2"/></p></Div> 
            <Div style="margin-top: 15px; margin-bottom: 10px"><p class="bordes1 h10" style="display: inline-block; margin-left: 5px; width: 130px">Pago 2do. Vto:  $</p><p class="bordes1" style="display: inline-block; width: 85px; text-align: right;"><jsp:getProperty name="boleta" property="monto2String"/></p></Div>  		
            <div style="margin-top: 30px"><p class="bordes1" style="text-align: center;">Tal&oacute;n para el Banco</p></div>
        </div >	
        <HR style="size: 2; color: negro; margin-bottom: 0px; margin-top: 30px"/> 
        <p align="center" style="margin-top: 0px; vertical-align: middle"><a  href="javascript:onClick=window.close();"> Volver </a> - <a href="javascript:onClick=window.print()">Imprimir Factura</a> </p>  
</div>
</body>
</html>
